Skip to main content

How to modify SUICheckBox border value and type by script using Java

When SUICheckBox is unchecked

In your Java class, do the following:

public class YourClass extends Component {

// creates a new SImageType
public SImageType type; // select in properties

// creates a new SUICheckBox, @AutoWired selects the component from this object
@AutoWired
private SUICheckBox checkBox;

@Override
public void start() {

}

@Override
public void repeat() {

// changes the SUICheckBox type
checkBox.setUncheckedImageType(type);
}
}

When SUICheckBox is checked

In your Java class, do the following:

public class YourClass extends Component {

// creates a new SImageType
public SImageType type; // select in properties

// creates a new SUICheckBox, @AutoWired selects the component from this object
@AutoWired
private SUICheckBox checkBox;

public void start() {

}

public void repeat() {

// changes the SUICheckBox type
checkBox.setCheckedImageType(tipo);
}
}